package com.cy.pj.common.datasource;

import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import javax.sql.DataSource;
import java.sql.Connection;
import java.sql.SQLException;

@SpringBootTest
public class DataSourcetest {
    @Autowired
    private DataSource dataSource;
    @Test
    public void testGetcourece() throws SQLException {
        Connection conn1=dataSource.getConnection();
        conn1.close();
    }
}
